﻿#include "ManualRecord.h"

ManualRecord::ManualRecord()
{
	m_type = "manual";
}

ManualRecord::~ManualRecord()
{
}

std::string ManualRecord::GetRecordId()
{
	return m_recordId;
}

void ManualRecord::SetRecordId(std::string v)
{
	m_recordId = v;
}

DateTime ManualRecord::GetBeginTime()
{
	return m_beginTime;
}

void ManualRecord::SetBeginTime(DateTime v)
{
	m_beginTime = v;
}

bool ManualRecord::GetRun()
{
	return m_run;
}

void ManualRecord::SetRun(bool v)
{
	m_run = v;
}

bool ManualRecord::GetCapture()
{
	return m_capture;
}

void ManualRecord::SetCapture(bool v)
{
	m_capture = v;
}

void ManualRecord::SetCallback(EVENT_RC_CB cb)
{
	m_cb = cb;
}

EVENT_RC_CB ManualRecord::GetCallback()
{
	return m_cb;
}

bool ManualRecord::IsTimeout()
{
	DateTime nextTime = m_startTime;
	nextTime.AddSeconds(5 * 60);

	DateTime currentTime = DateTime::Now();
	return DateTime::Diff(nextTime, currentTime) > 0;
}